Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Reactions now use volume averaged purity #1868

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

Steals-The-PRs
Copy link
Collaborator

Mirrored on Nova: NovaSector/NovaSector#803
Original PR: tgstation/tgstation#81246

About The Pull Request

Cause it only makes sense

Currently the purity of reagents created in a reaction is computed as follows

total sum of purity of all reagents present / total number of reagents

This is incorrect because regardless of how much "volume" of an impure/pure reagent is present the purity of the final solution is unaffected. Logically if we have more amount of an impure reagent the more impure the final solution should be & same for opposite case. This is the case for ph, where if we have a large volume of say "acidic" reagent then changes in other reagents have a small effect to the overall "acidity" of the solution. The same concept now applies for purity as well

get_average_purity()accounts for volume thus yielding more realistic results. The effect becomes more significant with larger volumes of reagents.

🆑 SyncIt21
fix: reactions now compute purity of reagents based on their volume, meaning larger amounts of reagents created will have more significant effects on the final purity of the solution
/:cl:

* Reactions now use volume averaged purity (#81246)

## About The Pull Request
Cause it only makes sense

Currently the purity of reagents created in a reaction is computed as
follows

`total sum of purity of all reagents present / total number of reagents`

This is incorrect because regardless of how much "volume" of an
impure/pure reagent is present the purity of the final solution is
unaffected. Logically if we have more amount of an impure reagent the
more impure the final solution should be & same for opposite case. This
is the case for ph, where if we have a large volume of say "acidic"
reagent then changes in other reagents have a small effect to the
overall "acidity" of the solution. The same concept now applies for
purity as well

`get_average_purity()`accounts for volume thus yielding more realistic
results. The effect becomes more significant with larger volumes of
reagents.

:cl:
fix: reactions now compute purity of reagents based on their volume,
meaning larger amounts of reagents created will have more significant
effects on the final purity of the solution
/:cl:

* Reactions now use volume averaged purity

* Merge #818

---------

Co-authored-by: SyncIt21 <[email protected]>
Co-authored-by: SomeRandomOwl <[email protected]>
@Iajret Iajret merged commit c683c83 into master Feb 9, 2024
24 checks passed
AnywayFarus added a commit that referenced this pull request Feb 9, 2024
@Iajret Iajret deleted the upstream-mirror-803 branch February 10, 2024 11:15
Iajret pushed a commit that referenced this pull request Apr 8, 2024
… cant bodyslam yourself (#1868)

* slaughter/laughter demon roundend report consume count + you cant bodyslam yourself (#82481)

## About The Pull Request

you cant bodyslam yourself as a slaughter/laughter demon
also
![2024-04-05 18_46_26-Space Station
13](https://github.com/tgstation/tgstation/assets/70376633/2f67747f-fbd4-471a-a8bf-b7c0df6948eb)

also moved antag datum stuff to mind init which means easier spawning


## Why It's Good For The Game

i wanted to brag in OOC about my supreme robust killcount but then i
realized theres no way to verify this
also hurting yourself is stupid

## Changelog
:cl:
qol: slaughter/laughter demons have a cooler round end report
qol: you may not bodyslam yourself as a demon
code: slaughter and laughter demons are given their antag datum when
their mind initializes
/:cl:

---------

Co-authored-by: MrMelbert <[email protected]>

* slaughter/laughter demon roundend report consume count + you cant bodyslam yourself

---------

Co-authored-by: jimmyl <[email protected]>
Co-authored-by: MrMelbert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants